﻿//-----------------------------------------------------------------------
// <copyright file="DefaultSettings.cs" company="FIT VUT">
//     Copyright (c) FIT VUT. All rights are reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Knihotoc_WP8.Data;

namespace Knihotoc_WP8.Settings
{
    public sealed class DefaultSettings
    {
        #region Private fields
        #region Singleton instance
        private static readonly DefaultSettings InstanceDefaultSettings = new DefaultSettings();
        #endregion Singleton instance

        private Color backGroundColor = Colors.White;
        
        private Color foreGroundColor = Colors.Blue;
        
        private OrderingOrder bookListOrderingOrder = OrderingOrder.ascending;
        
        private Visibility bookListThumbnailsVisibility = Visibility.Visible;

        private OrderingOrder placeListOrderingOrder = OrderingOrder.ascending;
        private SortingPlacesBy placeListSortingBy = SortingPlacesBy.distance;
        private FilterByCountry placeListFilerByCountry = FilterByCountry.all;
        private double distance = 10000;

        private User user = null;

        private double mapZoomLevel = 17.0;
        #endregion

        #region Constructors
        private DefaultSettings()
        {
        }
        #endregion

        #region Public properties
        #region Singleton accessor
        /// <summary>
        /// Gets the singleton's instance.
        /// </summary>
        public static DefaultSettings Instance
        {
            get
            {
                return InstanceDefaultSettings;
            }
        }
        #endregion

        /// <summary>
        /// Gets the default background color.
        /// </summary>
        public Color BackGroundColor
        {
            get
            {
                return this.backGroundColor;
            }
        }

        /// <summary>
        /// Gets the default foreground color.
        /// </summary>
        public Color ForeGroundColor
        {
            get
            {
                return this.foreGroundColor;
            }
        }

        /// <summary>
        /// Gets the default ordering for the list of books.
        /// </summary>
        public OrderingOrder BookListOrderingOrder
        {
            get
            {
                return this.bookListOrderingOrder;
            }
        }

        /// <summary>
        /// Gets the visibility setting for the list of books.
        /// </summary>
        public Visibility BookListThumbnailsVisibility
        {
            get
            {
                return this.bookListThumbnailsVisibility;
            }
        }

        public OrderingOrder PlaceListOrderingOrder
        {
            get
            {
                return placeListOrderingOrder;
            }
        }

        public SortingPlacesBy PlaceListSortingBy
        {
            get
            {
                return placeListSortingBy;
            }
        }

        public FilterByCountry PlaceListFilerByCountry
        {
            get
            {
                return placeListFilerByCountry;
            }
        }

        public double Distance
        {
            get
            {
                return distance;
            }
        }

        /// <summary>
        /// Gets the default user.
        /// </summary>
        public User User
        {
            get
            {
                return this.user;
            }
        }

        public double MapZoomLevel
        {
            get
            {
                return this.mapZoomLevel;
            }
        }
        #endregion        
    }
}